<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>vaeThink</title>
    {include file="../common/header"}
</head>
<body class="vae-body">

<div class="vae-content">
    <fieldset class="layui-elem-field layui-field-title" >
        <legend>客服组配置</legend>
    </fieldset>
    <form class="layui-form layui-form-pane" action="">
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">客服组成员</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容:20190512qio,20190512qi1" class="layui-textarea" name="user" required >{$info.user}</textarea>
            </div>
        </div>
        <div class="layui-form-item layui-form-text">
            <label class="layui-form-label">简介</label>
            <div class="layui-input-block">
                <textarea placeholder="请输入内容" class="layui-textarea" name="intro" required >{$info.intro}</textarea>
            </div>
        </div>
        <div class="layui-form-item">
            <input type="hidden" name="id" value="{$info.id}">
            <button class="layui-btn" lay-submit="" lay-filter="vaeform">立即提交</button>
        </div>
    </form>
</div>






{include file="../common/footer"}

<script>
    layui.config({
        base: '/themes/admin_themes/module/'
    }).use(['vaeyo','form'], function(){
        var table = layui.table
            ,vae = layui.vaeyo
            ,$ = layui.$
            ,form = layui.form;

        $("#call-ubtn").click(function () {
            var html="<div class=\"layui-inline\">\n" +
                "        <div class=\"layui-input-block\">\n" +
                "          <input type=\"text\" name=\"\" autocomplete=\"off\" placeholder=\"成员编码\" class=\"layui-input\">\n" +
                "        </div>\n" +
                "      </div>"
            $("#call-user").append(html);
        })
        //监听提交
        form.on('submit(vaeform)', function(data){
            $.ajax({
                url:"{:url('call/editData')}",
                type:'post',
                data:data.field,
                success:function(e){
                    if(e.code==1){
                        layer.confirm('保存成功,返回列表页吗?', {icon: 3, title:'提示'}, function(index){
                            vae.backThisTab();
                            layer.close(index);
                        });
                    }else{
                        layer.msg(e.msg);
                    }
                }
            })
            return false;
        });
    });
</script>

</body>
</html>